/*
*
* ████████╗░█████╗░███████╗██████╗░░█████╗░
* ╚══██╔══╝██╔══██╗██╔════╝██╔══██╗██╔══██╗
* ░░░██║░░░██║░░██║█████╗░░██████╦╝███████║
* ░░░██║░░░██║░░██║██╔══╝░░██╔══██╗██╔══██║
* ░░░██║░░░╚█████╔╝██║░░░░░██████╦╝██║░░██║
* ░░░╚═╝░░░░╚════╝░╚═╝░░░░░╚═════╝░╚═╝░░╚═╝
* 
*  :: 九方通逊-Henry ::   Copyright©2020 tofba.com  
* 
*/
package com.lmexpress.service;

import java.util.Map;

import com.lmexpress.orm.openapi.ExpressOrderApi;
import com.lmexpress.orm.rest.ApiLabelResponse;
import com.lmexpress.orm.rest.ApiOrderResponse;

/**
 * <小包对外API接口规范.>
 * 
 * @author Henry(fba02)
 * @version [版本号, 2020-12-9]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public interface ApiService {
	/**
	 * 
	 * <创建订单前置校验,针对不同服务商不同校验规则;偏远地址校验.>
	 * 
	 * @param expressOrderApi
	 * @return
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-10]
	 * @see [类、类#方法、类#成员]
	 */
	public ApiOrderResponse preProcessCreateOrder(ExpressOrderApi expressOrderApi);

	/**
	 * 
	 * <订单转换,将九方小包订单信息转换成对应服务商订单>
	 * 
	 * @param expressOrderApi
	 * @return
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-10]
	 * @see [类、类#方法、类#成员]
	 */
	public String mapping(ExpressOrderApi expressOrderApi);

	/**
	 * 
	 * <创建订单,单个下单>
	 * 
	 * @param expressOrderApi
	 * @return
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-10]
	 * @see [类、类#方法、类#成员]
	 */
	public ApiOrderResponse createOrder(ExpressOrderApi expressOrderApi);

	/**
	 * 
	 * <获取面单,追踪号获取>
	 * 
	 * @param trackNumber
	 * @param configure
	 * @return
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-10]
	 * @see [类、类#方法、类#成员]
	 */
	public ApiLabelResponse label(String trackNumber, Map<String, String> configure);

	/**
	 * 
	 * <获取面单,追踪号获取>
	 * 
	 * @param referenceNo
	 * @param trackNumber
	 * @param configure
	 * @return
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-10]
	 * @see [类、类#方法、类#成员]
	 */
	public ApiLabelResponse label(String referenceNo, String trackNumber, Map<String, String> configure);

	/**
	 * <面单渲染.> <1.向已经存在面单添加自定义信息>
	 * 
	 * @param trackNumber     追踪号
	 * @param expressOrderApi 订单信息
	 * @return
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-16]
	 * @see [类、类#方法、类#成员]
	 */
	public ApiLabelResponse labelRender(String trackNumber, ExpressOrderApi expressOrderApi);

	/**
	 * 
	 * <轨迹追踪,追踪号查询>
	 * 
	 * @param trackNumber
	 * @param configure   运行参数变量
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-10]
	 * @see [类、类#方法、类#成员]
	 */
	public void tracking(String trackNumber, Map<String, String> configure);

	/**
	 * 
	 * <根据其他单号获取追踪号,可以是客户参考号,订单号,第三方系统订单号,六脉追踪号>
	 * 
	 * @param code
	 * @param configure
	 * @return
	 * @author Henry(fba02)
	 * @version [版本号, 2020-10-10]
	 * @see [类、类#方法、类#成员]
	 */
	public String trackNumber(String code, Map<String, String> configure);

	/**
	 * <跟路径>
	 */
	public final static String DEFAULT_LABEL_ROOT = "D:/data/upload/";

	/**
	 * <默认小包面单文件夹>
	 */
	public final static String DEFAULT_LABEL_FOLDER = "express_label";

	/**
	 * <默认退件>
	 */
	public final static String DEFAULT_RETURN_SIGN = "N";

	/**
	 * <默认发件人>
	 */
	public final static String DEFAULT_SHIPPER = "1";

	/**
	 * <退件>
	 */
	public final static String RETURN_SIGN_YES = "Y";

	/**
	 * <默认发件国二字码>
	 */
	public final static String DEFAULT_SHIPPER_COUNTRY_CODE = "CN";
	/**
	 * <默认收件国二字码>
	 */
	public final static String DEFAULT_CONSIGNEE_COUNTRY_CODE = "US";
	/**
	 * <默认币种>
	 */
	public final static String DEFAULT_CURRENCY = "USD";

	/**
	 * <成功标识>
	 */
	public final static String DEFAULT_SUCCESS = "SUCCESS";
}